<?php
namespace Home\Controller;
use Think\Controller;
class IndexController extends Controller {

    public function index(){
        $this->display();
    }

    public function test () {
        $this->display();
    }

    public function save_test () {
        if ( $d =D('Test')->create() ) {
            M('Test')->add($d);
        }else{
            exit(D('Test')->getError());
        }
    }
}